<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
	
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>

<%@ include file="/WEB-INF/views/shared/master/contentHeader.jsp"%>
<%@ include file="/WEB-INF/views/shared/master/index.jsp"%>
<%
	request.setAttribute("title","实验数据");
	request.setAttribute("modelConfigPath", "studentManager");
%>

<t:form commandName="experimentExcelSearch" action="/admin/experimentExcel/index2" ajaxPost="true" onSuccess="onSuccess">
	<t:panel cssClass="panel-flat border-top-xlg border-top-primary" customBody="true" customHead="true">
		<t:panelHead title="实验数据表"></t:panelHead>
		<div class="panel-body">
			<div class="row">
				<c:import url="input2.jsp" />
			</div>
			<div id="tableContent" class="row">
				<c:import url="output2.jsp" />
			</div>
		</div>
	</t:panel>
</t:form>
<script type="text/javascript">	

	$(function(){
		$("#projectId").on("change",function(){
			loadExcelSelect2();
		})
	
	});

	function loadExcelSelect2(){
		var projectId=$("#projectId").val();
		var url=$.getVirtualPath()+"/admin/experiment/queryListByProjectId";
		var experiments=$.getJsonPost(url, "projectId="+projectId);
		
		$("#experimentId").children().remove();
		if($.isNull(experiments)){
			formSubmit();
			return ;
		}
		var options=[];
		$.each(experiments,function(index,element){
			options.push("<option value='"+element.experimentId+"'>"+element.experimentName+"</option>");
		});
		$("#experimentId").append(options);
		formSubmit();
		$("#experimentId").on("change",function(){
			formSubmit();
		})
	}
	
	function pagerChangeCallback(){
		formSubmit();
	}
	
	function sortingCallback(){
		formSubmit();
	}
	function formSubmit(){
		var experimentId = $("#experimentId").val();
	
		var url=$.getVirtualPath()+"/admin/experimentExcel/index2?experimentId="+experimentId+"&ajaxPost=true";
		var res = $.getTextPost(url);
	
		$("#tableContent").html(res);		
		redrawTable();
	}
</script>
<%@ include file="/WEB-INF/views/shared/master/cntable.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/jqueryui.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formbuttons.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formstyling.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formselects.jsp"%>

<%@ include file="/WEB-INF/views/shared//master/contentFooter.jsp"%>